﻿<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeBehind="Login.aspx.cs" Inherits="Web.PuntoDeVenta.Account.Login" %>

<%@ Import Namespace="Web.Framework.Translate" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">  
    <link href="/Styles/App/Login.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/jquery-ui-1.8.15.custom.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jqueryWCF.js" type="text/javascript"></script>
    <script src="/Scripts/json2.min.js" type="text/javascript"></script>
    <script src="/Scripts/App/Login.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
            $("#dialog:ui-dialog").dialog("destroy");

            $("#dialog-modal-ptoVta").dialog({
                height: 'auto',
                autoOpen: false,
                width: 'auto',
                modal: true,
                buttons: {
                    Ok: function () {
                        MarcarSeleccionDePtoVta();
                        $(this).dialog("close");
                    }
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div class="pnlPtoVentaSelect">
        <asp:LinkButton ID="lnkPtoVentaSelect" runat="server" CssClass="lnkPtoVentaSelect"
            OnClientClick="openDialogSelectPtoVta(); return false;"><img src="/Images/shoppingcart.jpg" alt="" width="25px" height="25px"/><span><asp:Literal ID="Literal1" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["SeleccionarPuntoDeVenta"]%>' /></span></asp:LinkButton>
    </div>
    <asp:HiddenField ID="hidPtoVta" runat="server" ClientIDMode="Static" />
    <h2>
        <asp:Literal ID="Literal2" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["HeadLoginStatusText"]%>' />
    </h2>
    <p>    
        <asp:Literal ID="Literal3" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["IngreseUsuarioYPassword"]%>' />
    </p>
    <div class="accountInfo">
        <fieldset class="login">
            <legend><asp:Literal ID="Literal4" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["InformacionText"]%>' /></legend>
            <p>
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="txtUserName"><asp:Literal ID="Literal5" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["UsuarioText"]%>' /></asp:Label>
                <asp:TextBox ID="txtUserName" runat="server" CssClass="textEntry" ClientIDMode="Static"></asp:TextBox>
            </p>
            <p>
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="txtPassword"><asp:Literal ID="Literal6" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["PasswordText"]%>' /></asp:Label>
                <asp:TextBox ID="txtPassword" runat="server" CssClass="passwordEntry" TextMode="Password"
                    ClientIDMode="Static"></asp:TextBox>
            </p>
            <p>
                <asp:Label ID="lblPtoVtaInfo" runat="server" ClientIDMode="Static"></asp:Label>
            </p>
        </fieldset>
        <p class="submitButton">
            <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text='<%$ Code:  LocalizationProvider.Instance["LoginText"] %>' OnClientClick="return ValidarSubmitLogin();"
                OnClick="btnLogin_Click" />
        </p>
    </div>
    <div id="dialog-modal-ptoVta" title='<%= LocalizationProvider.Instance["TitleSeleccionePuntoVta"] %>' class="dialogmodalptoVta">
        <p>
            <asp:Label ID="CompanyLabel" runat="server" AssociatedControlID="cboCompany"><asp:Literal ID="Literal7" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["EmpresaText"]%>' /></asp:Label>
            <br />
            <asp:DropDownList ID="cboCompany" runat="server" CssClass="textEntry" Width="320px"
                ClientIDMode="Static" onchange="fillCboPtoVta();">
            </asp:DropDownList>
        </p>
        <p>
            <asp:Label ID="PuntoDeVentaLabel" runat="server" AssociatedControlID="cboPtoVta"><asp:Literal ID="Literal8" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["PuntoDeVentaText"]%>' /></asp:Label>
            <br />
            <asp:DropDownList ID="cboPtoVta" runat="server" CssClass="textEntry" Width="320px"
                ClientIDMode="Static">
            </asp:DropDownList>
        </p>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#dialog-modal-ptoVta").parent().appendTo($("form:first"));

            // Saco el link del instructivo
            $('#spanInstructivo').remove();

        });

    </script>
</asp:Content>
